package cn.gzjp.modules.logis.entity;

import org.hibernate.validator.constraints.Length;

import cn.gzjp.common.persistence.DataEntity;
import cn.gzjp.common.utils.excel.annotation.ExcelField;

/**
 * 消息Entity
 * @author zengcp
 * @version 2018-05-16
 */
public class LogisMessage extends DataEntity<LogisMessage> {
	
	private static final long serialVersionUID = 1L;
	private String openid;		// openid
	private String content;		// content
	private Integer status;		// 0未读 1已读
	private String deliveryId;		// 运单id
	private String type;		// 1系统消息
	
	public LogisMessage() {
		super();
	}

	public LogisMessage(String id){
		super(id);
	}

	@Length(min=0, max=32, message="openid长度必须介于 0 和 32 之间")
	@ExcelField(title="openid", align=2, sort=1)
	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}
	
	@Length(min=0, max=2000, message="content长度必须介于 0 和 2000 之间")
	@ExcelField(title="content", align=2, sort=2)
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	
	@ExcelField(title="0未读 1已读", align=2, sort=3)
	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}
	
	@Length(min=0, max=32, message="运单id长度必须介于 0 和 32 之间")
	@ExcelField(title="运单id", align=2, sort=4)
	public String getDeliveryId() {
		return deliveryId;
	}

	public void setDeliveryId(String deliveryId) {
		this.deliveryId = deliveryId;
	}
	
	@Length(min=0, max=1, message="1系统消息长度必须介于 0 和 1 之间")
	@ExcelField(title="1系统消息", align=2, sort=7)
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
}